import React, {Component} from 'react';
import {
    View,
    Text,
    StyleSheet,
    TouchableOpacity,
    Image
} from 'react-native';



//import TabNavigators from 'react-native-tab-navigator';
//import home from '../home/one';/


class Main extends Component {

    //设置顶部导航栏的内容
    static navigationOptions = ({navigation, screenProps}) => ({
        //左侧标题
        headerTitle:  '首页',
        //设置跳转页面左侧返回箭头后面的文字，默认是上一个页面的标题
        headerBackTitle: null,
        //顶部标题栏的样式
        headerStyle: styles.headerStyle,
        //顶部标题栏文字的样式
        headerTitleStyle: styles.headerTitleStyle,
    });
//    constructor(props) {
//        super(props);
//        this.state = {selectedTab: "home"}
//    }
    render() {
        return (
            <View style={styles.container}>

                           <Text style={{fontSize:18,padding:15,color: 'blue'}} onPress={() => {this.props.navigation.navigate('Menu')}}>This is Event Page</Text>

            </View>

        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',

    },
    button: {
        width: 240,
        height: 45,
        borderRadius: 5,
        alignItems: 'center',
        justifyContent: 'center',
        backgroundColor: '#4398ff',
    },
    headerStyle: {
        backgroundColor: '#4398ff',
        height:44,
    },
    headerTitleStyle: {
        //标题的文字颜色
        color: 'white',
        //设置标题的大小
        fontSize: 14,
        marginLeft:0,
        //居中显示
        textAlign: 'center',
        width:'100%',

    },
    tabText: {
            fontSize: 10,
            color: 'black'
        },
        selectedTabText: {
            fontSize: 10,
            color: 'red'
        },
        icon: {
            width: 22,
            height: 22
        },
        page0: {
            flex: 1,
            fontSize:16,
            backgroundColor: 'yellow'
        },
        page1: {
            flex: 1,
            fontSize:16,
            backgroundColor: 'blue'
        }
});

module.exports = Main;